;(function(window) {

var svgSprite = '<svg>' +
  ''+
    '<symbol id="icon-baocun" viewBox="0 0 1024 1024">'+
      ''+
      '<path d="M960 252.736L771.008 64H86.4a22.528 22.528 0 0 0-22.4 22.4v851.2c0 12.352 10.112 22.4 22.4 22.4h851.2c12.288 0 22.4-10.048 22.4-22.4v-215.36a22.4 22.4 0 0 0-44.864 0V596.032h0.256c0 0.512-0.256 0.896-0.256 1.344a22.4 22.4 0 1 0 44.864 0c0-0.512-0.256-0.896-0.256-1.344H960v-96h-0.32c0.064-0.576 0.32-1.088 0.32-1.6a22.4 22.4 0 0 0-44.864 0c0 0.576 0.256 1.024 0.32 1.6H915.2V414.976h0.064l-0.064 0.384a22.4 22.4 0 0 0 44.8 0.064l-0.064-0.384H960V252.736z" fill="" ></path>'+
      ''+
      '<path d="M108.8 915.2V108.8h643.648L915.2 271.296V915.2z" fill="#4A5FA0" ></path>'+
      ''+
      '<path d="M241.984 64v203.584c0 12.288 10.112 22.4 22.4 22.4h483.2c12.288 0 22.4-10.112 22.4-22.4V64h-528z" fill="" ></path>'+
      ''+
      '<path d="M286.784 108.8h438.4v136.384h-438.4z" fill="#B3B2B1" ></path>'+
      ''+
      '<path d="M769.984 960V548.352a22.592 22.592 0 0 0-22.464-22.4H264.32a22.528 22.528 0 0 0-22.4 22.4V960h528.064z" fill="" ></path>'+
      ''+
      '<path d="M286.784 570.816h438.4V915.2h-438.4z" fill="#B3B2B1" ></path>'+
      ''+
      '<path d="M548.032 136h145.984v81.984H548.032z" fill="#949494" ></path>'+
      ''+
      '<path d="M670.976 653.248c0 12.288-10.048 22.4-22.4 22.4h-275.2c-12.288 0-22.4-10.048-22.4-22.4s10.112-22.4 22.4-22.4h275.2c12.352 0 22.4 10.112 22.4 22.4zM670.976 744.64c0 12.288-10.048 22.4-22.4 22.4h-275.2c-12.288 0-22.4-10.048-22.4-22.4s10.112-22.4 22.4-22.4h275.2a22.4 22.4 0 0 1 22.4 22.4zM670.976 836.032c0 12.288-10.048 22.4-22.4 22.4h-275.2c-12.288 0-22.4-10.048-22.4-22.4s10.112-22.4 22.4-22.4h275.2a22.4 22.4 0 0 1 22.4 22.4z" fill="" ></path>'+
      ''+
      '<path d="M168.576 858.368a16 16 0 0 1-32 0V169.024a16 16 0 0 1 32 0v689.344z" fill="#FFFFFF" ></path>'+
      ''+
    '</symbol>'+
  ''+
'</svg>'
var script = function() {
    var scripts = document.getElementsByTagName('script')
    return scripts[scripts.length - 1]
  }()
var shouldInjectCss = script.getAttribute("data-injectcss")

/**
 * document ready
 */
var ready = function(fn){
  if(document.addEventListener){
      document.addEventListener("DOMContentLoaded",function(){
          document.removeEventListener("DOMContentLoaded",arguments.callee,false)
          fn()
      },false)
  }else if(document.attachEvent){
     IEContentLoaded (window, fn)
  }

  function IEContentLoaded (w, fn) {
      var d = w.document, done = false,
      // only fire once
      init = function () {
          if (!done) {
              done = true
              fn()
          }
      }
      // polling for no errors
      ;(function () {
          try {
              // throws errors until after ondocumentready
              d.documentElement.doScroll('left')
          } catch (e) {
              setTimeout(arguments.callee, 50)
              return
          }
          // no errors, fire

          init()
      })()
      // trying to always fire before onload
      d.onreadystatechange = function() {
          if (d.readyState == 'complete') {
              d.onreadystatechange = null
              init()
          }
      }
  }
}

/**
 * Insert el before target
 *
 * @param {Element} el
 * @param {Element} target
 */

var before = function (el, target) {
  target.parentNode.insertBefore(el, target)
}

/**
 * Prepend el to target
 *
 * @param {Element} el
 * @param {Element} target
 */

var prepend = function (el, target) {
  if (target.firstChild) {
    before(el, target.firstChild)
  } else {
    target.appendChild(el)
  }
}

function appendSvg(){
  var div,svg

  div = document.createElement('div')
  div.innerHTML = svgSprite
  svg = div.getElementsByTagName('svg')[0]
  if (svg) {
    svg.setAttribute('aria-hidden', 'true')
    svg.style.position = 'absolute'
    svg.style.width = 0
    svg.style.height = 0
    svg.style.overflow = 'hidden'
    prepend(svg,document.body)
  }
}

if(shouldInjectCss && !window.__iconfont__svg__cssinject__){
  window.__iconfont__svg__cssinject__ = true
  try{
    document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>");
  }catch(e){
    console && console.log(e)
  }
}

ready(appendSvg)


})(window)
